package com.example.vm.domain.vo;

import com.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Objects;

@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@ToString
public class HotVideo implements Serializable {
    private static final long serialVersionUID = 1L;
    //热度
    private Double hot;
    //视频id
    private Long videoId;
    //视频标题
    private String title;

    public HotVideo(Double hot, Long videoId, String title) {
        this.hot = hot;
        this.videoId = videoId;
        this.title = title;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        HotVideo hotVideo = (HotVideo) o;
        return Objects.equals(videoId, hotVideo.videoId) &&
                Objects.equals(title, hotVideo.title);
    }

    @Override
    public int hashCode() {
        return Objects.hash(videoId, title);
    }
}
